// JavaScript Document

var image = {
	
	saveItem : function() 
	{
		// validate
        var f = document.forms[0];		
		if (f.local_file.value.strip() == '')
		{
			f.local_file.focus();
			alert('Please fill image name');
			return false;
		}
		f.action = SITE_URL + 'admin/upload_images.image_process.saveItem/';
		f.submit();
		return true;
    },
	clickItem : function(itemName,path) 
	{
		var f = window.opener.document.frm_get_image;
		f.url.value = path+'/'+itemName;
		var img = "<img src ="+ path+'/'+itemName +">";
		var image_pre = window.opener.document.getElementById('image_pre');
		image_pre.src = path+'/'+itemName;
		close();
			
		return true;
    }
}
